package com.toKnow.mapper;

import com.toKnow.model.dto.SearchDto;
import com.toKnow.model.entity.Column;
import com.toKnow.model.entity.Tag;
import com.toKnow.model.entity.Type;

import java.util.List;

public interface ColumnMapper {
    public Column selectById(Integer id);
    public Boolean updateLikeNumber(Integer id,Integer num);
    public Boolean updateCollectNumber(Integer id,Integer num);
    public Boolean updateReadNumber(Integer id,Integer num);
//    public Boolean insertUserLike(Integer userId,Integer columnId);
    public Boolean insertUserCollect(Integer userId,Integer columnId);
    public Boolean insertUserRead(Integer userId,Integer columnId);
//    public Boolean deleteUserLike(Integer userId,Integer columnId);
    public Boolean deleteUserCollect(Integer userId,Integer columnId);
//    public Boolean deleteUserRead(Integer userId,Integer columnId);
//    public Boolean checkUserLike(Integer userId,Integer columnId);
    public Boolean checkUserCollect(Integer userId,Integer columnId);
    public Boolean checkUserRead(Integer userId,Integer columnId);
    public Boolean updateUserRead(Integer userId,Integer columnId);
    public List<Type> selectTypeById(Integer columnId);
    public List<Tag> selectTagById(Integer columnId);
    public List<Integer> selectColumnByArticleId(Integer articleId);
//    public List<Integer> selectColumnBySourceId(Integer sourceId);
    public List<Column> selectColumnBySearch(SearchDto searchDto);
}
